package com.zhousb.deviceManager.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhousb.deviceManager.common.PageRequest;
import com.zhousb.deviceManager.common.R;
import com.zhousb.deviceManager.common.ResponseResult;
import com.zhousb.deviceManager.model.bo.CreateAssetByInventoryBO;
import com.zhousb.deviceManager.model.so.OrderSO;
import com.zhousb.deviceManager.service.InventoryService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/inventory")
public class InventoryController {

    @Resource
    private InventoryService inventoryService;

    @PostMapping("/page")
    public ResponseResult page(@RequestBody PageRequest<OrderSO> so){
        return R.success(inventoryService.page(new Page<>(so.getCurrent(),so.getSize()),so.getQuery()));
    }


}
